home *** CD-ROM | disk | FTP | other *** search
-
- #define STRING_CONTROL 0
- #define BACKSPACE_CONTROL 1
- #define BOLD_STRING "\033B"
-
- int printer_type; /* Type of printer (string or backspace) */
- /* Set at initialization time */
-
- print(attribute, string)
- int attribute;
- char *string;
- {
- int length;
- switch(attribute)
- {
- case NORMAL_PRINT:
- fprintf(printer,string);
- break;
- case BOLD_PRINT:
- switch(printer_type)
- {
- case STRING_CONTROL:
- fprintf(printer,BOLD_STRING);
- fprintf(printer,string);
- break;
- case BACKSPACE_CONTROL:
- length = strlen(string);
- while (length--)
- {
- fprintf("%c",*string);
- fprintf("\b");
- fprintf("%c",*string);
- string++;
- }
- }
- break;
- }
- }
-
-